<div >    
  <table class="datalist">
  <tr>
    <th scope="col" width="100px">名称</th>
    <th scope="col" width="100px">题标</th>
    <th scope="col" width="100px">类型</th>
    <th scope="col" width="100px">所属频道</th>
    <th scope="col" width="100px">类别</th>
    <th colspan="5" scope="col" width="350px"></th>
  </tr>
  <% 
    i = 0  
    @contents.each do |c| 
  %>
    <% if i%2 == 0 %>
  <tr>
    <% else %>
  <tr  class="altrow">    
    <% end %>
    <td><%=h c.name %></td>
    <td><%=h c.title %></td>
    <td><%=h c.c_type %></td>
    <td><%= c.channel_id %></td>
    <% if c.is_article =="yes"%>
    <td>文章</td>
    <% elsif c.is_article == "no" %>
    <td>子目录</td>
    <% else %>
    <td>未知</td>
    <%  end %>
    <td><%= link_to '查看', {:id => c, :action => :show } %></td>
    <td><%= link_to '删除', {:id => c, :action => :destroy}, :confirm => '确定删除?'  %></td>
  </tr>
  <% 
    i += 1
    end 
  %>
</table>
</div>
